package com.dong.course.mapper;

import com.dong.course.dto.CourseDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CourseMapper {
    @Select("select c.id,c.title,c.description,tc.teacher_id as `teacher.id`" +
            "from pe_course c " +
            "left join pr_teacher_course tc " +
            "on c.id=tc.course_id")
    List<CourseDTO> listCourse();

}
